<template>
    <div>
        <Page :title="title" @toPage="toB"></Page>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router'
import { useStore } from '@/store';
import Page from '@/components/Page.vue';

const router = useRouter();
const mainStore = useStore();

const title = ref('页面A');

const toB = (val) => {
    console.log('val', val);
    mainStore.setInput1(val);
    router.push('/pageB');
}
</script>

<style lang="scss" scoped>

</style>